<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<!DOCTYPE html>
<html>
<head>
	<meta http-equiv="Content-Type" content="UTF-8">
	<title>红酒会 - 智能红酒管家</title>
	<link rel="shortcut icon" type="image/x-icon" href="${ctx}/favicon.ico" />
	<link type="text/css" rel="stylesheet" href="${ctx}/static/styles/bootstrap.min.css" />
</head>
<body>
	
	<c:import url="/header"><c:param name="module">vintry</c:param></c:import>
	<c:import url="/vintry/menu"><c:param name="menu">6</c:param></c:import>
	<c:import url="/talk/right" />
	
	<div class="outWrap">
		<div class="allnewBoxIn">
	        <div style="min-height:670px;">
	        	<table class="table table-bordered table-condensed">
						<thead>
							<tr>
								<th>红酒名称</th>
								<th>年份</th>
								<th>容量</th>
								<th>操作时间</th>
								<th>操作类型</th>
								<th>操作数量</th>
							</tr>
						</thead>
						<tbody>
							<c:forEach var="list" items="${page.content}">
								<tr>
									<td>
										<a href="${ctx}/vintry/detail/log/${list.wine.id}">
											<c:choose>
												<c:when test="${not empty list.wine.chName}">
													${list.wine.chName}
												</c:when>
												<c:otherwise>${list.wine.enName}</c:otherwise>
											</c:choose>
										</a>
									</td>
									<td style="text-align:center">${list.wine.vintage}年</td>
									<td style="text-align:right">${list.wine.capacity}ml</td>
									<td style="text-align:center"><fmt:formatDate value="${list.editTime}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
									<td style="text-align:center">
										<c:choose>
											<c:when test="${list.type==0}">入库</c:when>
											<c:otherwise>出库</c:otherwise>
										</c:choose>
									</td>
									<td style="text-align:right">${list.num}</td>
								</tr>
							</c:forEach>
						</tbody>
					</table>
	        
	            <div class="pageListBox">
	            	<div class="pageList">
	            		<c:choose>
				  			<c:when test="${index == 0}">
				  				<a class="Pre now_A" href="javascript:;">首&nbsp;&nbsp;&nbsp;页</a>
	                			<a class="Pre now_A" href="javascript:;">上一页</a>
				  			</c:when>
				  			<c:otherwise>
				  				<a class="Pre" href="${ctx}/vintry/log/list" ">首&nbsp;&nbsp;&nbsp;页</a>
	                			<a class="Pre" href="${ctx}/vintry/log/list?index=${index - 1}">上一页</a>
				  			</c:otherwise>
				  		</c:choose>
				  		<c:choose>
				  			<c:when test="${page.totalPages == 0 or index == page.totalPages - 1}">
				  				<a class="Pre now_A" href="javascript:;">下一页</a>
	                			<a class="Pre now_A" href="javascript:;">尾&nbsp;&nbsp;&nbsp;页</a>
				  			</c:when>
				  			<c:otherwise>
				  				<a class="Pre" href="${ctx}/vintry/log/list?index=${index + 1}">下一页</a>
	                			<a class="Pre" href="${ctx}/vintry/log/list?index=${page.totalPages - 1}">尾&nbsp;&nbsp;&nbsp;页</a>
				  			</c:otherwise>
				  		</c:choose>
	                </div>
	            </div>
	        </div>
	    </div>
	</div>

	<c:import url="/WEB-INF/views/footer.jsp" />
</body>
</html>